export const Leaf = ({attributes, children, leaf}) => {
  if (leaf.bold) {
    children = <strong>{children}</strong>
  }
  if (leaf.code) {
    children = <span className={"code-inline"}>{children}</span>
  }

  if (leaf.italic) {
    children = <em>{children}</em>
  }

  if (leaf.lineThrough) {
    children = <s>{children}</s>
  }

  return (
    <span {...attributes}>{children}</span>
  )
};
